package com.example.leetdemo.finash;

import java.util.HashSet;
import java.util.Set;

public class Solution2442 {
    public int countDistinctIntegers(int[] nums) {
        Set<Integer> set = new HashSet<>();
        for(int i = 0; i < nums.length; i++) {
            set.add(nums[i]);
            StringBuilder builder = new StringBuilder();
            builder.append(nums[i]);
            set.add(Integer.parseInt(builder.reverse().toString()));
        }
        return set.size();
    }

    public static void main(String[] args) {
        StringBuilder builder = new StringBuilder();
        builder.append("100");
        builder.delete(0, builder.length());
        int rei = Integer.parseInt(builder.reverse().toString());
        System.err.println(builder.length());
    }
}
